<template>
  <div class="flex flex-col h-screen">
    <topNavbar v-if="!isLoginRoute" />
    <div class="flex flex-1">
      <sideNavbar v-if="!isLoginRoute" />
      <div class="container mx-auto p-4 flex-1">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<style>
html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
}
</style>

<script>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import sideNavbar from './components/navigation/sideNavbar.vue'
import topNavbar from './components/navigation/topNavbar.vue'

export default {
  name: 'App',
  components: {
    sideNavbar,
    topNavbar
  },
  setup() {
    const route = useRoute()
    const isLoginRoute = computed(() => route.path === '/login')
    return { isLoginRoute }
  }
}
</script>
